#include <iostream>
#include <vector>


using namespace std;

int GCD(int a,int b)
{
    int c;
    while(c = a % b)
    {
        a = b;
        b = c;
    }
    return b;
}
int Get(int n,int power)
{
    vector<int> num(n);
    for(int i = 0;i<n;++i)
    {
        cin>>num[i];

    }

    for(int i = 0;i<n;++i)
    {
        if(power>=num[i])
            power += num[i];
        else
            power += GCD(power,num[i]);
    }
    return power;

}

void Test1() {
    int n,a,power;
    while(cin>>n>>a)
    {
        power = Get(n,a);
        cout<<power<<endl;

    }
}

char getFirstOneChar(const string &str) {
    int hash[256] = {0};
    for (int i = 0; i < str.size(); ++i) {
        hash[str[i]]++;
    }
    for (int i = 0; i < str.size(); ++i) {
        if (hash[str[i]] == 1)
            return str[i];
    }
    return -1;
}

void Test2(){
    string str;
    char ret;
    while(getline(cin, str)){
        ret = getFirstOneChar(str);
        if (ret == -1)
            cout << -1 << endl;
        else
            cout << ret << endl;
    }
}

int main() {
    Test2();
    return 0;
}